package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.entity.Setmeal;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 根据菜品id查询套餐id
     * @param dishIds
     * @return
     */
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    /*
    * 套餐分页查询
    * @param setmeal
    * @return
    */
    @Select("select setmeal.*, category.name as categoryName from setmeal left join category on setmeal.category_id = category.id where setmeal.status = 1")
    Page<Setmeal> pageQuery(Setmeal setmeal);
}
